<script setup lang="ts">
import { ref } from 'vue';
// import { Swiper, SwiperSlide } from 'swiper/vue';
// import 'swiper/css';
// import { Autoplay, Pagination, Navigation } from 'swiper/modules';
// 注册使用的模块
// const modules = [Autoplay, Pagination, Navigation];

import axios from 'axios';
const banner_img = ref([]);



const initOEMBanner = () => {
    const url = web_url + '/api/banner.index?name=oem_banner';
    axios.get(url).then((res) => {

        res.data.image_list.forEach(res => {
            banner_img.value.push(res.image)
        });

        console.log(banner_img.value)
    });
}
initOEMBanner();
</script>

<template>
    <div class="oem-lunbo">
        <Swiper :loop="true">

<SwiperSlide v-for="(item, index) in banner_img" :key="index">

    <img :src="item" class="slide-image" alt="轮播图" />

</SwiperSlide>

</Swiper>
    </div>
    
</template>    

<style lang="less">

    .oem-lunbo{

        .swiper{
            width:1920px;
            height:auto;
            margin:0 auto;
        }
    }


</style>